//
//  YTTMacros.h
//  YTT-IOS-CommonFramework
//
//  Created by aron on 2017/2/23.
//  Copyright © 2017年 aron. All rights reserved.
//

#ifndef YTTMacros_h
#define YTTMacros_h

// 自定义的Log
#ifdef DEBUG
//#define BMLog(...)
#define BMLog(...) NSLog(@"%s:%d\n%@",__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])
#else
#define BMLog(...)
#endif


// 工具类
#define ValueOrEmpty(value) 	((value)?(value):@"")


//app主目录
#define HOME_DIRECTORY			NSHomeDirectory()
//app下Documents 目录
#define DOCUMENTS_DIRECTORY     [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
//程序主Bundle目录
#define MAIN_BUNDLEPATH			[[NSBundle mainBundle] resourcePath]


//常用Size
#define SCREEN_WIDTH        ([[UIScreen mainScreen] bounds].size.width)
#define SCREEN_HEIGHT       ([[UIScreen mainScreen] bounds].size.height)
#define APP_VIEW_HEIGHT     (SCREEN_HEIGHT-64)
#define STATUSBAR_HEIGHT        20
#define NAVIGATIONBAR_HEIGHT    44
#define TABBAR_HEIGHT           49
#define SUB_TABBAR_HEIGHT       44


//UIColor
#define RGB(r, g, b)        [UIColor colorWithRed: (float)(r)/255.f green: (float)(g)/255.f blue: (float)(b)/255.f alpha: 1.0f]
#define RGBA(r, g, b, a)    [UIColor colorWithRed: (float)(r)/255.f green: (float)(g)/255.f blue: (float)(b)/255.f alpha: a]
// 随机色宏定义
#define YTTRandomColor SNColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))


#endif /* YTTMacros_h */
